import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
{
  path:'/',
  redirect:'/home'
},
{
  path:'/home',
  component:()=>import('@/views/home.vue'),
  children:[
    {
      path:'search',
      component:()=>import('@/pages/search.vue'),
    },
    {
      path:'index',
      component:()=>import('@/pages/index.vue'),
    },
    {
      path:'order',
      component:()=>import('@/pages/order.vue'),
    },
    {
      path:'my',
      component:()=>import('@/pages/my.vue'),
    },
    {path:'type',
    component:()=>import('@/pages/type.vue')
    }
  ]
},
{
  path:'/business',
  component:()=>import('@/pages/business.vue'),
  children:[
    {
      path:'commodity',
      component:()=>import('@/pages/commodity.vue')
    },
    {
      path:'evaluate',
      component:()=>import('@/pages/evaluate.vue')
    },
    {
      path:'information',
      component:()=>import('@/pages/information.vue')
    },
  ]
}
]

const router = new VueRouter({
  routes
})

export default router
